package com.steak.concurrent.locksupport;

import java.util.concurrent.locks.LockSupport;

public class LockSupportTest {
    public static void main(String[] args) throws InterruptedException {
        Thread thread = new Thread(() -> {
            System.out.println("child thread start ");
            while (!Thread.currentThread().isInterrupted()){
                LockSupport.park();
            }
            System.out.println("child thread end");
        });
        thread.start();
        System.out.println("main thread");
        thread.interrupt();
    }
}
